{% extends 'Base.html' %}
{% load staticfiles %}
{% load compress %}
{% block main %}
    <!-- Nav tabs -->
    <div class="layui-tab" lay-filter="userCenter" style="background-color: white;margin-top: 5px;table-layout:fixed;">
    <ul class="layui-tab-title">
        <li class="layui-this" lay-id="articleList">文章列表</li>
        <li lay-id="userInfo">用户信息</li>
    </ul>
    <div class="layui-tab-content" style="padding-left: 0px;width: 100%">
        <div class="layui-tab-item layui-show">
            <table class="layui-table" lay-skin="nob">
                <colgroup>
                    <col>
                    <col class="bcm-small-hide">
                    <col>
                    <col class="bcm-small-hide">
                </colgroup>
                <thead>
                <tr>
                    <th class="bcm-small-hide">属性</th>
                    <th>文章名称</th>
                    <th class="bcm-small-hide">更新时间</th>
                </tr>
                </thead>
                <tbody>
                {% for article in  articles %}
                    <tr>
                        <td class="bcm-small-hide">
                            {% if article.md %}<span>MD</span>{% endif %}
                            {% if article.hide %}<span>未发表</span>
                                &nbsp;{% else %}<span>已发表</span>{% endif %}
                        </td>
                        <td>
                            <a style="color: #3f81b0"
                               href="{% url 'article-detail-view' article.id %}"><b>{{ article.title|safe }}</b></a>
                        </td>
                        <td class="bcm-small-hide">{{ article.update_time|date:"Y-m-d H:i:s" }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
            {% if not articles %}
                <blockquote class="layui-elem-quote">
                    这家伙太懒,什么都没留下
                </blockquote>
            {% endif %}

            {#  翻页#}
            {% include 'pagination/pagination.html' %}
        </div>
        <div class="layui-tab-item">
            {% include 'import/other_user.html' %}
        </div>
    </div>
    {% compress js %}
        <script type="text/javascript" src="{% static 'js/article_list.js' %}"></script>
    {% endcompress %}
{% endblock %}
{% block side %}
{% endblock %}